package com.uls.hdh.domain;

import java.util.Date;
import java.util.List;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.uls.hdh.vo.TaskCommentVo;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.uls.common.annotation.Excel;
import com.uls.common.core.domain.BaseEntity;

/**
 * 投票事项对象 hdh_polls
 * 
 * @author hdh
 * @date 2024-11-08
 */
public class HdhPolls extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long pollId;

    /** 创建者 */
    @Excel(name = "创建者")
    private String creator;

    /** 投票标题 */
    @Excel(name = "投票标题")
    private String title;

    /** 投票描述 */
    @Excel(name = "投票描述")
    private String description;

    /** 标记是否为匿名投票 */
    @Excel(name = "标记是否为匿名投票")
    private Integer isAnonymous;
    @Excel(name = "选项")
    private Long optionId;
    /** 选项内容 */
    @Excel(name = "选项内容")
    private String optionText;

    public Long getOptionId() {
        return optionId;
    }

    public void setOptionId(Long optionId) {
        this.optionId = optionId;
    }

    public String getOptionText() {
        return optionText;
    }

    public void setOptionText(String optionText) {
        this.optionText = optionText;
    }

    /** 投票开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "投票开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 投票结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "投票结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 创建人 */
    @Excel(name = "创建人")
    private String createdBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /** 更新人 */
    @Excel(name = "更新人")
    private String updatedBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedTime;

    /** 流程id */
    @Excel(name = "流程id")
    private Long flowInstantId;

    //是否同意vo
    private Integer agree;

    public Integer getAgree() {
        return agree;
    }

    public void setAgree(Integer agree) {
        this.agree = agree;
    }

    //批注vo
    private String comment;
    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    //审批过程数据列表vo
    private List<TaskCommentVo> taskCommentVoList;

    public List<TaskCommentVo> getTaskCommentVoList() {
        return taskCommentVoList;
    }

    public void setTaskCommentVoList(List<TaskCommentVo> taskCommentVoList) {
        this.taskCommentVoList = taskCommentVoList;
    }



    /** 状态(0-未提交，1-打回，2-审核中，3-已完成) */
    @Excel(name = "状态(0-未提交，1-打回，2-审核中，3-已完成)")
    private Long status;

    public void setPollId(Long pollId) 
    {
        this.pollId = pollId;
    }

    public Long getPollId() 
    {
        return pollId;
    }
    public void setCreator(String creator) 
    {
        this.creator = creator;
    }

    public String getCreator() 
    {
        return creator;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setIsAnonymous(Integer isAnonymous) 
    {
        this.isAnonymous = isAnonymous;
    }

    public Integer getIsAnonymous() 
    {
        return isAnonymous;
    }
    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setCreatedBy(String createdBy) 
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() 
    {
        return createdBy;
    }
    public void setCreatedTime(Date createdTime) 
    {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() 
    {
        return createdTime;
    }
    public void setUpdatedBy(String updatedBy) 
    {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() 
    {
        return updatedBy;
    }
    public void setUpdatedTime(Date updatedTime) 
    {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime() 
    {
        return updatedTime;
    }
    public void setFlowInstantId(Long flowInstantId) 
    {
        this.flowInstantId = flowInstantId;
    }

    public Long getFlowInstantId() 
    {
        return flowInstantId;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("pollId", getPollId())
            .append("creator", getCreator())
            .append("title", getTitle())
            .append("description", getDescription())
                .append("optionId", getOptionId())
            .append("isAnonymous", getIsAnonymous())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedTime", getUpdatedTime())
            .append("flowInstantId", getFlowInstantId())
            .append("status", getStatus())
            .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        HdhPolls hdhPolls = (HdhPolls) o;
        return Objects.equals(pollId, hdhPolls.pollId) &&
                Objects.equals(creator, hdhPolls.creator) &&
                Objects.equals(title, hdhPolls.title) &&
                Objects.equals(description, hdhPolls.description) &&
                Objects.equals(isAnonymous, hdhPolls.isAnonymous) &&
                Objects.equals(startTime, hdhPolls.startTime) &&
                Objects.equals(endTime, hdhPolls.endTime) &&
                Objects.equals(createdBy, hdhPolls.createdBy) &&
                Objects.equals(createdTime, hdhPolls.createdTime) &&
                Objects.equals(updatedBy, hdhPolls.updatedBy) &&
                Objects.equals(updatedTime, hdhPolls.updatedTime) &&
                Objects.equals(flowInstantId, hdhPolls.flowInstantId) &&
                Objects.equals(agree, hdhPolls.agree) &&
                Objects.equals(comment, hdhPolls.comment) &&
                Objects.equals(taskCommentVoList, hdhPolls.taskCommentVoList) &&
                Objects.equals(status, hdhPolls.status);
    }

    @Override
    public int hashCode() {
        return Objects.hash(pollId, creator, title, description, isAnonymous, startTime, endTime, createdBy, createdTime, updatedBy, updatedTime, flowInstantId, agree, comment, taskCommentVoList, status);
    }
}
